import ISearch from "@/components/common/i_search.vue"
import ICol from "@/components/common/i_col.vue"
import IInput from "@/components/common/i_input.vue"
import ITable from "@/components/common/i_table.vue"
import IUpload from "@/components/common/i_upload.vue"
import IDelete from "@/components/common/i_delete.vue"
import ISelect from "@/components/common/i_select.vue"
import IEditor from "@/components/common/i_editor.vue";
import IDatePick from "@/components/common/i_date_pick.vue";
import IDateRangePick from "@/components/common/i_date_range_pick.vue";
import { App } from 'vue'


import * as Icons from "@ant-design/icons-vue"
import type { Component } from 'vue'
const Icon:Record<string, Component> = Icons

export const createComponents = (app: App<Element>) => {
    app.component('iSearch', ISearch);
    app.component('iCol', ICol);
    app.component('iInput', IInput);
    app.component('iTable', ITable);
    app.component('iUpload', IUpload);
    app.component('iDelete', IDelete);
    app.component('iSelect', ISelect);
    app.component('iEditor', IEditor);
    app.component('iDatePick', IDatePick);
    app.component('iDateRangePick', IDateRangePick);
    for (const i in Icon) {
        app.component(i, Icon[i])
    }
}